﻿<UserControl x:Class="Kokomo.PeInspector.Reflection.AssemblyStringsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:r="clr-namespace:Kokomo.PeInspector.Reflection"	
			 xmlns:pe="clr-namespace:Kokomo.PeInspector"
			 xmlns:env="xaml://kokomo/environment"
			 xmlns:kui="xaml://kokomo/ui"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
	<Grid>
		<pe:SearchView
			SearchTerm="{Binding SearchTerm}"
			IsSearching="{Binding IsSearching}"
			SearchProgress="{Binding SearchProgress}"
			>
			<kui:EnhancedTreeView
				Grid.Row="1"
				ItemsSource="{Binding Results}"
				VirtualizingStackPanel.IsVirtualizing="True"
				VirtualizingStackPanel.VirtualizationMode="Recycling"
				>
				<TreeView.ItemContainerStyle>
					<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource {x:Static env:EditorStyleKeys.TreeNodeStyleKey}}">
						<Setter Property="kui:EventBindingManager.EventBindings">
							<Setter.Value>
								<kui:EventBindingCollection>
									<kui:RuntimeEventBinding
											EventName="ItemActivated"
											Command="{Binding DataContext.NavigateToCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
											CommandParameter="{Binding Target}"
											/>
								</kui:EventBindingCollection>
							</Setter.Value>
						</Setter>
					</Style>
				</TreeView.ItemContainerStyle>
			</kui:EnhancedTreeView>
		</pe:SearchView>
	</Grid>
</UserControl>
